Test Series - java script

Test Number 62/92

Q: What is the usage of the keyword ?? in R?
A. Help window
B. Extensive search
C. Error correction
D. Error detection
Solution: The ?? function scans the documentation for packages installed in your library. ?? (keyword) is generally used for a more extensive search when compared to the keyword ?.
Q: Which type of comment is not supported in R?
A. Single-line comments
B. Multi-line comments
C. Both Single-line & Multi-line comments
D. Multiple Comments
Solution: R supports single-line comments, but not multiline comments. # is used for making a single line comment.
Q: What is the usage of the keyword ? in R?
A. Help window
B. Extensive search
C. Error correction
D. Error detection
Solution: ? is generally used to open the help window at any time. The help() function and ? help operator in R provides access to the documentation pages for R functions, data sets, and other objects, both for packages in the standard R distribution and for contributed packages.
Q: Which symbol is used to start a comment?
A. /
B. $
C. #
D. ?
Solution: ‘#’ is used to comment a line. A single line comment can be made in R.
Q: Which of the following is the assignment operator?
A. <-
B. ->
C. =
D. ==
Solution: The operators <- and = can be used, almost interchangeably, to assign to a variable in the same environment. The assignment operator is a left-pointing arrow, so creating and declaring variables looks like this:
foo <- bar
Q: Which of the following is a loosely-typed language?
A. R
B. T
C. S
D. Both R and S
Solution: R is an implementation of the S programming language combined with lexical scoping semantics, inspired by Scheme. [15] S was created by John Chambers in 1976, while at Bell Labs. R and S are loosely-typed languages and it supports all of the scalar data types you would expect: string, numbers, and booleans.
Q: What is the limit to matrices in R?
A. One dimensional
B. Two dimensional
C. Three dimensional
D. No limit
Solution: Matrices are like strictly typed two-dimensional arrays. You create a matrix using the matrix function, which accepts five parameters: a vector to use as the content, the number of rows to shape the content into, the number of columns to shape the content into, an optional boolean value to indicate whether the content should be shaped by row or by column (the default is FALSE for by column), and a list that contains vectors for row names and column names:
matrix([content vector], nrow=[number of rows], ncol=[number of columns], byrow=[how to sort], dimnames=[vector of row names, vector of column names]).
Q: Which is the function used to add the vectors?
A. c()
B. add(vectors)
C. c(vectors)
D. vectors.add
Solution: The c() is a generic function which combines its arguments. It is used to add the vectors.
Q: Which of the following list contains multiple data types?
A. Vectors
B. Data frames
C. Matrices
D. Arrays
Solution: Data frames are multidimensional lists that can contain multiple data types.
Q: Which function is used to create data frames?
A. data.frames()
B. frame.data()
C. data.frame()
D. frame(data)
Solution: Data frames are multidimensional lists that can contain multiple data types. A data frame is a table or a two-dimensional array-like structure in which each column contains values of one variable and each row contains one set of values from each column.

You Have Score    /10